{#include file="admin_header.htm"#}
<script type="text/javascript" src="admin_ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="js/article_tit_color.js"></script>
<script type="text/javascript" src="js/is_show.js"></script>
{#include file="admin_article_nav.htm"#}
<div class="admin_main_nr_box">
  <form action="admin_article_save.php?act=editsave" method="post" enctype="multipart/form-data" name="FormData" id="FormData" onsubmit="return chk_regform();">
    <table width="700" border="0" cellpadding="3" cellspacing="1" bgcolor="#EAEAEA">
      <tr>
        <td width="67" align="right" bgcolor="#FFFFFF">文章標題：</td>
        <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="3">
            <tr>
              <td width="28%"><input name="title" type="text"  class="article_text_long" value="{#$edit_article.title#}" maxlength="45"/></td>
              <td width="2%"><div id="article_color_box_bg" onclick="Qishi_is_display()" ></div><input type="hidden" name="tit_color" id="tit_color" value="{#$edit_article.tit_color#}"></td>
              <td width="70%" valign="top">{#include file="admin_article_color.htm"#}</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF">文章分類：</td>
        <td bgcolor="#FFFFFF"><select name="type_id" id="type_id"  style="height:26px; width:165px; font-size:14px; padding:3px; margin-left:3px;">
          <option value="">請選擇文章分類：</option>
		  {#section name=category loop=$category_list#}
          <option value="{#$category_list[category].id#}" {#if $category_list[category].id== $edit_article.type_id#} selected="selected" {#/if#}>{#$category_list[category].categoryname#}</option>
		   {#section name=category_f loop=$category_list[category].category#}
		   <option value="{#$category_list[category].category[category_f].id#}" {#if $category_list[category].category[category_f].id==$edit_article.type_id#} selected="selected" {#/if#}>&nbsp;&nbsp;|-{#$category_list[category].category[category_f].categoryname#}</option>
		  {#/section#}{#/section#}
        
        </select> </td>
      </tr>
	  <tr>
        <td align="right" bgcolor="#FFFFFF">縮&nbsp;&nbsp;略&nbsp;&nbsp;圖：</td>
        <td height="26" bgcolor="#FFFFFF" class="link_lan">
		{#if $edit_article.Small_img#}<a href="{#$thumb_dir#}{#$edit_article.Small_img#}" target="_blank" onmousemove="showpup('<img src={#$thumb_dir#}{#$edit_article.Small_img#}  border=0  align=absmiddle>')" onmouseout="hidepup()" >{#$edit_article.Small_img#} </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="admin_article_save.php?act=del_img&id={#$edit_article.id#}&img={#$edit_article.Small_img#}" style="color: #006600">[刪除重新上傳]</a>{#else#}
		<input type="file" name="Small_img"  style="height:24px; width:230px; font-size:12px; line-height:20px; margin-left:3px;"  onKeyDown="alert('請點擊右側“瀏覽”選擇您電腦上的圖片！');return false"/>
		{#/if#}		</td>
      </tr>
    </table>
    <table width="700" border="0" cellpadding="0" cellspacing="0" bgcolor="#EAEAEA">
      <tr>
        <td width="100" bgcolor="#FFFFFF"><textarea cols="80" name="content" rows="10" >{#$edit_article.content#}</textarea>
            <script type="text/javascript">
CKEDITOR.replace( 'content',
{
skin : 'kama'
});
      </script></td>
      </tr>
      <tr>
        <td height="50" align="center" bgcolor="#FFFFFF"><input type="submit" name="Submit" value="確定提交" class="Qishi_submit_a" onmouseover="this.className='Qishi_submit_b'"  onmouseout="this.className='Qishi_submit_a'"/>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="reset" name="Submit2" value="重置表單" class="Qishi_submit_a" onmouseover="this.className='Qishi_submit_b'"  onmouseout="this.className='Qishi_submit_a'"/></td>
      </tr>
    </table>
    <table width="700" border="0" cellpadding="3" cellspacing="1" bgcolor="#EAEAEA">
      <tr>
        <td width="134" height="30" align="right" bgcolor="#FFFFFF">是否顯示：</td>
        <td width="207" bgcolor="#FFFFFF"><input name="is_display" type="radio" value="1"  {#if $edit_article.is_display==1#} checked="checked"{#/if#} />
顯示
<input type="radio" name="is_display" value="0" {#if $edit_article.is_display==0#} checked="checked"{#/if#} /> 
不顯示</td>
        <td width="80" align="right" bgcolor="#FFFFFF">文章排序：</td>
        <td width="250" bgcolor="#FFFFFF"><input name="article_order" type="text"  class="article_text" id="article_order" style="width:50px;" onkeyup="if(event.keyCode !=37 && event.keyCode != 39) value=value.replace(/\D/g,'');" value="{#$edit_article.article_order#}" maxlength="8"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\D/g,''))"/>
        <span>&nbsp;&nbsp;&nbsp;&nbsp;數字越大越靠前</span></td>
      </tr>
      <tr>
        <td height="30" align="right" bgcolor="#FFFFFF">作者：</td>
        <td bgcolor="#FFFFFF"><input name="author" type="text" class="article_text" id="author" value="{#$edit_article.author#}" maxlength="20"/></td>
        <td align="right" bgcolor="#FFFFFF">標題加粗：</td>
        <td bgcolor="#FFFFFF"><input name="tit_b" type="checkbox" id="tit_b" value="1"  {#if $edit_article.tit_b==1#} checked="checked"{#/if#} />
        加粗</td>
      </tr>
	  <tr>
        <td height="30" align="right" bgcolor="#FFFFFF">來源：</td>
        <td bgcolor="#FFFFFF"><input name="source" type="text" class="article_text" id="source" maxlength="50" value="{#$edit_article.source#}"/></td>
        <td align="right" bgcolor="#FFFFFF">外部鏈接：</td>
        <td bgcolor="#FFFFFF"><input name="is_url" type="text" class="article_text" id="is_url" value="{#$edit_article.is_url#}" maxlength="100"/></td>
	  </tr>
	  <tr>
        <td height="30" align="right" bgcolor="#FFFFFF">文章屬性：</td>
        <td colspan="3" bgcolor="#FFFFFF">
		{#section name=get_article_property loop=$get_article_property#}
		<input name="focos" type="radio" value="{#$get_article_property[get_article_property].id#}" {#if $edit_article.focos==$get_article_property[get_article_property].id#} checked="checked"{#/if#} />
{#$get_article_property[get_article_property].categoryname#}
{#/section#}</td>
      </tr>
      <tr>
        <td height="30" align="right" bgcolor="#FFFFFF">關鍵字(keywords)：</td>
        <td colspan="3" bgcolor="#FFFFFF"><input name="seo_keywords" type="text" class="article_text" id="keywords"  maxlength="30"  style="width:500px;"  value="{#$edit_article.seo_keywords#}"/></td>
      </tr>
      <tr>
        <td height="30" align="right" valign="top" bgcolor="#FFFFFF">描述(description)：</td>
        <td colspan="3" bgcolor="#FFFFFF"><textarea name="seo_description" class="article_textarea" id="description">{#$edit_article.seo_description#}</textarea>
<input name="id" type="hidden" id="id" value="{#$edit_article.id#}" /></td>
      </tr>
    </table>
  </form>
</div>
{#if $edit_article.tit_color#}
<script type="text/javascript" >
var rgb="{#$edit_article.tit_color#}";
document.FormData.tit_color.value= rgb;
document.getElementById('tit_color').style.background=rgb;
document.getElementById('article_color_box_bg').style.background=rgb;
</script>
{#/if#}
{#include file="admin_footer.htm"#}
</body>
</html>
